<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:lang-xmllang="en">
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .large-font{
            font-size: 20px;
            color: red;
        }
    </style>
    <script>
        function fun1(){
            alert("attr onclic")
        }
    </script>
</head>
<body>
<p>设置任何属性值</p>

<form action="/hello.html" method="post" th:attr="action=${myaction}">
    账号：<input type="text" name="username"><br/>
    密码：<input type="password" name="pwd"><br/>
    <input type="submit" value="登录" th:attr="value=${mytext},onclick='fun1()'">
</form>
<br/>
<form th:action="@{/user/listuser}" method="post">
    账号：<input type="text" name="username"><br/>
    密码：<input type="password" name="pwd"><br/>
    <input type="submit" th:value="${mytext}">
</form>
<br/>
<a th:href="@{/hello.html}" th:class="large-font">连接地址</a>
<img th:src="@{/img/1.jpg}" th:alt-title="狗"/>
<input type="checkbox" value="游泳" th:checked="${selected}">游泳<br/>
<input type="checkbox" value="骑车" th:checked="${unselect}">骑车<br/>
</body>
</html>